import { createApp } from 'vue'
import App from './App.vue'
import Router from "@/route/Router";

import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/index.css'

const mainApp = createApp(App)

mainApp.use(ElementPlus, {
    size: 'small',
    zIndex: 3000,
    fontSize: 12
})

mainApp.config.globalProperties.$router = Router

mainApp.mount('#app')

String.prototype.formats = function (...args) {
    return this.replace(/{(\d+)}/g, function (match, number) {
        return typeof args[number] != 'undefined' ? args[number] : match
    })
}